package com.cycrix.tcp;

import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;

public abstract class TcpObject {
	public abstract int GetSize();
	public abstract int GetStream(byte[] buffer, int size);
	public abstract TcpObject FromStream(byte[] buffer);
	public abstract int GetType();
	
	public static Charset UTF8 = Charset.defaultCharset();
	public static CharsetEncoder UTF8Encoder = UTF8.newEncoder();
	public static CharsetDecoder UTF8Decoder = UTF8.newDecoder();
}
